//
//  ZYXNavOneViewController.m
//  OCUIAdvanced
//
//  导航控制器的 1 子控制器
//


#import "ZYXNavOneViewController.h"

#import "ZYXNavTwoViewController.h"

@interface ZYXNavOneViewController ()

- (IBAction)jumpTwo;

@end


@implementation ZYXNavOneViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.navigationItem.title = @"第1个控制器";
    
    // 修改下一个界面返回按钮的文字
    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:nil action:nil];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:nil action:nil];
}

- (IBAction)jumpTwo {
    // 调到第2个控制器
    ZYXNavTwoViewController *two = [[ZYXNavTwoViewController alloc] init];
    [self.navigationController pushViewController:two animated:YES];
}

@end
